3.25.55 \(\int \frac {a+b x^n}{x} \, dx\) [2455]

Optimal. Leaf size=13 \[ \frac {b x^n}{n}+a \log (x) \]

[Out]

b*x^n/n+a*ln(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {14} \begin {gather*} a \log (x)+\frac {b x^n}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + a*Log[x]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin {align*} \int \frac {a+b x^n}{x} \, dx &=\int \left (\frac {a}{x}+b x^{-1+n}\right ) \, dx\\ &=\frac {b x^n}{n}+a \log (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 18, normalized size = 1.38 \begin {gather*} \frac {b x^n}{n}+\frac {a \log \left (x^n\right )}{n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*x^n)/x,x]

[Out]

(b*x^n)/n + (a*Log[x^n])/n

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 17, normalized size = 1.31

method result size
risch \(\frac {b \,x^{n}}{n}+a \ln \left (x \right )\) \(14\)
norman \(a \ln \left (x \right )+\frac {b \,{\mathrm e}^{n \ln \left (x \right )}}{n}\) \(16\)
derivativedivides \(\frac {b \,x^{n}+a \ln \left (x^{n}\right )}{n}\) \(17\)
default \(\frac {b \,x^{n}+a \ln \left (x^{n}\right )}{n}\) \(17\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)/x,x,method=_RETURNVERBOSE)

[Out]

1/n*(b*x^n+a*ln(x^n))

________________________________________________________________________________________

Maxima [A]
time = 0.30, size = 18, normalized size = 1.38 \begin {gather*} \frac {b x^{n}}{n} + \frac {a \log \left (x^{n}\right )}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="maxima")

[Out]

b*x^n/n + a*log(x^n)/n

________________________________________________________________________________________

Fricas [A]
time = 0.48, size = 15, normalized size = 1.15 \begin {gather*} \frac {a n \log \left (x\right ) + b x^{n}}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="fricas")

[Out]

(a*n*log(x) + b*x^n)/n

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 17, normalized size = 1.31 \begin {gather*} \begin {cases} a \log {\left (x \right )} + \frac {b x^{n}}{n} & \text {for}\: n \neq 0 \\\left (a + b\right ) \log {\left (x \right )} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)/x,x)

[Out]

Piecewise((a*log(x) + b*x**n/n, Ne(n, 0)), ((a + b)*log(x), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)/x,x, algorithm="giac")

[Out]

integrate((b*x^n + a)/x, x)

________________________________________________________________________________________

Mupad [B]
time = 1.19, size = 13, normalized size = 1.00 \begin {gather*} a\,\ln \left (x\right )+\frac {b\,x^n}{n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)/x,x)

[Out]

a*log(x) + (b*x^n)/n

________________________________________________________________________________________